package com.pig.controller;

import com.pig.pojo.order.Order;
import com.pig.pojo.shop.Shop;
import com.pig.pojo.user.User;
import com.pig.service.ShopService;
import com.pig.service.UserService;
import com.pig.util.SysResult;
import com.pig.util.SysResultLayui;
import com.pig.vo.ShopTable;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class ShopController {
    @Autowired
    private ShopService shopService;
    /**
     * 分页查询用户信息
     */

    @RequestMapping("/shop/findShopByPage")
    public SysResultLayui findItemByPage(int page, int limit,Integer count){
        return shopService.findUserByPage(page,limit);
    }

    /**发货*/
    @RequestMapping("/shop/update")
    public SysResult dateUser(String orderId){

       shopService.updateUsers(orderId);
        return SysResult.success();
    }

    @RequestMapping("/shop/updateStatus")
    public SysResult updateStatus(String orderId){

        shopService.updateStatus(orderId);
        return SysResult.success();
    }
}
